package org.fireflow2.designer.eclipse.policies.datafield;

import java.util.Map;

import org.eclipse.gef.commands.Command;
import org.eclipse.gef.editpolicies.ContainerEditPolicy;
import org.eclipse.gef.requests.CreateRequest;
import org.fireflow2.designer.eclipse.commands.datafield.CreateDataFieldCommand;
import org.fireflow2.designer.eclipse.modelwrapper.collection.DataFieldListWrapper;

public class DataFieldListEditPolicy extends ContainerEditPolicy{

	@Override
	protected Command getCreateCommand(CreateRequest request) {
		// TODO Auto-generated method stub
		Map extendedData = request.getExtendedData();
		DataFieldListWrapper dfldsWrapper = (DataFieldListWrapper)extendedData.get("Parent");
		CreateDataFieldCommand cmd = new CreateDataFieldCommand();
		cmd.setParent(dfldsWrapper);
		return cmd;
	}

}
